/**
 * 
 */
package org.bspv.pharma.manager.impl;

import java.util.List;

import org.bspv.pharma.dao.TypeOfSupplyDAO;
import org.bspv.pharma.manager.TypeOfSupplyManager;
import org.bspv.pharma.model.Drugstore;
import org.bspv.pharma.model.TypeOfSupply;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author guillaume
 * 
 */
@Service(value = "typeOfSupplyManager")
public class TypeOfSupplyManagerImpl extends
		AbstractManagerImpl<TypeOfSupply, Long> implements TypeOfSupplyManager {

    /**
     * Constructeur par défaut.
     * @param dao DAO
     */
	@Autowired
	public TypeOfSupplyManagerImpl(TypeOfSupplyDAO dao) {
		super(dao);
	}

	/**
	 * {@inheritDoc}
	 */
    @Override
    public List<TypeOfSupply> findAllValidSupplies(Drugstore drugstore) {
        String[] empty = {};
        String[] keys = { "drugstore" };
        Object[] values = { drugstore };
        String[] nullProperties = { "obsolete" };
        return dao.findBy(keys, values, nullProperties, empty);
    }
}
